{$CLEO .cm}

0000: NOP

$ONMISSION = 1
$Lap = 1
0ADF: add_dynamic_GXT_entry "LAP" text "LAP"
0ADF: add_dynamic_GXT_entry "LAPNUM" text "~w~Lap ~1~"
03C4: set_status_text $Lap type 0 GXT 'LAP' // global_variable  // Score ~1~
//03C4: set_status_text $LapNum type 0 GXT 'LAPNUM' // global_variable  // Score ~1~
Model.Load(#VC_ADMIRAL)
Model.Load(1212)
Model.Load(#BALLAS1)
038B: load_requested_models 
0A92: create_custom_thread "RACETRACK_RACE/PORTLAND/AI_#1.CS"
0A92: create_custom_thread "RACETRACK_RACE/PORTLAND/AI_#2.CS"
0A92: create_custom_thread "RACETRACK_RACE/PORTLAND/AI_#3.CS"
//0A92: create_custom_thread "RACETRACK_RACE/PORTLAND/LUIGI_HAZARDS.CS"
//4th side
5@ = car.Create(#VC_ADMIRAL, 9628.6211, 7862.9102, 49.8801)
car.Angle(5@) = 359.6689
car.Health(5@) = 3500
036A: put_actor $PLAYER_ACTOR in_car 5@

{6@ = car.Create(#VC_ADMIRAL, 7487.9829, 8605.4854, 59.5624)
car.Angle(6@) = 89.8801
car.Health(6@) = 3500  }

:Checkpoint

0107: 1@ = create_object 1212 at 9614.3945 8004.4756 49.7814
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
//018B: set_marker 0@ radar_mode 2


:checkpoint_1
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9614.3945 8004.4756 49.7814 radius 15.0 15.0 15.0 sphere 1 in_car

jf @checkpoint_1
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9444.4082 8040.3965 24.6328
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
//018B: set_marker 0@ radar_mode 2

:checkpoint_2
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9444.4082 8040.3965 24.6328 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_2
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9376.9258 8043.0361 14.7827
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
//018B: set_marker 0@ radar_mode 2

:checkpoint_3
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9376.9258 8043.0361 14.7827 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_3
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9368.8242 8232.665 6.5832
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
//018B: set_marker 0@ radar_mode 2
:checkpoint_4
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9368.8242 8232.665 6.5832 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_4
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9319.001 8251.9902 2.1496
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
//018B: set_marker 0@ radar_mode 2
:checkpoint_5
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9319.001 8251.9902 2.1496 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_5
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9222.4424 8253.3916 5.1329
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
//018B: set_marker 0@ radar_mode 2
:checkpoint_6
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9222.4424 8253.3916 5.1329 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_6
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9204.5088 8216.3691 7.2613
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
//018B: set_marker 0@ radar_mode 2
:checkpoint_7
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9204.5088 8216.3691 7.2613 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_7
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup



0107: 1@ = create_object 1212 at 9158.9971 7800.7827 14.7827
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
//018B: set_marker 0@ radar_mode 2
:checkpoint_8
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9158.9971 7800.7827 14.7827 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_8
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9066.6348 7793.7593 14.7796
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
//018B: set_marker 0@ radar_mode 2
:checkpoint_9
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9066.6348 7793.7593 14.7796 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_9
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9067.6846 7274.582 4.6982
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
//018B: set_marker 0@ radar_mode 2
:checkpoint_10
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9067.6846 7274.582 4.6982 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_10
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9108.7295 7229.5498 4.7326
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
//018B: set_marker 0@ radar_mode 2
:checkpoint_11
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9108.7295 7229.5498 4.7326 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_11
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9257.7627 7221.8398 14.7327
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
//018B: set_marker 0@ radar_mode 2
:checkpoint_12
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9257.7627 7221.8398 14.7327 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_12
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9314.4561 7189.918 14.6234
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
//018B: set_marker 0@ radar_mode 2
:checkpoint_13
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9314.4561 7189.918 14.6234 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_13
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9538.21 7192.6382 14.6264
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
//018B: set_marker 0@ radar_mode 2
:checkpoint_14
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9538.21 7192.6382 14.6264 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_14
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9566.1191 7210.2109 14.6264
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
:checkpoint_15
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9566.1191 7210.2109 14.6264 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_15
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9575.3818 7291.6543 14.76
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
:checkpoint_16
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9575.3818 7291.6543 14.76 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_16
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9379.3389 7495.3633 14.7796 
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
:checkpoint_17
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9379.3389 7495.3633 14.7796 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_17
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9377.2617 7745.2314 19.7797
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
:checkpoint_18
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9377.2617 7745.2314 19.7797 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_18
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9575.5732 7753.4072 43.7523
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
:checkpoint_19
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9575.5732 7753.4072 43.7523 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_19
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup

0107: 1@ = create_object 1212 at 9575.5732 7753.4072 43.7523
object.CollisionDetection(1@, 0)
0750: set_object 1@ visibility 0
marker.CreateAboveObject(0@, 1@)
marker.SetColor(0@, 3)
:checkpoint_20
wait 0
if
0100:   actor $PLAYER_ACTOR in_sphere 9575.5732 7753.4072 43.7523 radius 15.0 15.0 15.0 sphere 1 in_car
jf @checkpoint_20
marker.Disable(0@)
object.Destroy(1@)
if
$ONMISSION == 1
jf @Cleanup
if
$Lap == 3
jf @LAP

jump @Cleanup


:LAP
$Lap += 1
01E3: show_text_1number_styled GXT "LAPNUM" number $Lap time 3000 style 4  // NEW HIGH SCORE!!~n~~w~~1~

jump @Checkpoint
:Cleanup
0ACD: show_text_highpriority "You win the race!" time 3000
//marker.Disable(0@)
0151: remove_status_text $Lap
$Lap = 1
$ONMISSION = 0
mission_cleanup
end_thread